* OPEN STATA OUTPUT FILE LOG *

log using "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Output/APPENDIX G MODELS.04-20-2021.smcl", replace




   ****** ANALYSIS OF MANUSCRIPT MODELS PROGRAM FILE: OMITTING SAMPLE SELECTION BIAS FROM N = 265 UNCONFIRMED CASES, ///
   ******  BUT ACCOUNTING FOR 23 RIGHT-CENSORED CASES CONFIRMED IN FUTURE CONGRESS OBSERVED IN KRAUSE & O'CONNELL DATABASE [NOT THWARTED BY FORMAL PROCEDURES] ****** 
   
   
  *** PLEASE NOTE THAT THE REGRESSION SAMPLES HAVE 59 FEWER OBSERVATIONS DUE TO LACK OF AGENCY IDEOLOGY MEASURES: ///
  *** 58 FEWER UNCENSORED CASES (N = 991 VERSUS N = 1,049); 1 FEWER CENSORED CASE (N = 22 VERSUS N = 23),   

   
   
   **** PROGRAM FILE FOR "CONFIRMATION DYNAMICS" PROJECT [UPDATED FROM 04-20-2021]: TESTING 'DUE DILIGENCE' THEORY HYPOTHESES USING QUANTILE SURVIVAL REGRESSION MODELS [N = 1,013]****

   **** APPENDIX G: PRESIDENTIAL-SENATE MAJORITY IDEOLOGICAL ALIGNMENT & IDEOLOGICAL OPPOSITION TO FEDERAL AGENCIES AS CONTROL COVARIATES ****
    
   

   
   
   
   
   
   **** QUANTILE SURVIVAL MODELS: ASYMMETRIC LAPLACE MLE CONDITIONAL DENSITY SURVIVAL MODELS OF CONFIRMATION DECAY ****
 
 
 

 * OPEN UPDATED "CONFIRMATION DYNAMICS" DATABASE [08-13-2020] *
 
use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace




*** CREATE NEW COVARIATES THAT ACCOUNT FOR DISTINCTIONS BETWEEN BOTH PRESIDENT & SENATE MAJORITY OPPOSED AS WELL AS ALIGNED WITH AGENCY IN QUESTION *** 
*** REPLACE SENMAJAGENCYIDEOLOPPOSE & SENMAJAGENCYIDEOLALIGN COVARIATES EMPLOYED IN BOTH THE MANUSCRIPT MODELS AND ELSEWHERE ***


*** BOTH PRESIDENT & SENATE MAJORITY ARE IDEOLOGICALLY ALIGNED WITH AN AGENCY ****

gen pressenmajalignagency =  1 if prespty2==-1 & senmajparty==-1 & agencyideol==-1
replace pressenmajalignagency =  1 if prespty2==1 & senmajparty==1 & agencyideol==1
replace pressenmajalignagency =  0 if pressenmajalignagency==. & agencyideol!=.
*
tab pressenmajalignagency


*** BOTH PRESIDENT-SENATE MAJORITY ARE IDEOLOGICALLY OPPOSED TO AN AGENCY ****

gen pressenmajopposeagency =  1 if prespty2==-1 & senmajparty==-1 & agencyideol==1
replace pressenmajopposeagency =  1 if prespty2==1 & senmajparty==1 & agencyideol==-1
replace pressenmajopposeagency =  0 if pressenmajopposeagency==. & agencyideol!=.
*
tab pressenmajopposeagency


******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************



*** "DUE DILIGENCE" CONTEXTUAL EFFECTS BASED ON POSITION TYPE [TIER 1 VERSUS TIER 2 NOMINEE SLOPE DIFFERENCES] ***
*** NOTE: CONTEXTUAL VARIABLES THAT APPEAR MULTIPLICATIVE/INTERACTION FORM ARE RESCALED TO BE ZERO BOUNDED FOR EASE OF INTERPRETATION OF ADDITIVE BASELINE EFFECTS ***



***************************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************




**** OUTCOME EQUATIONS: PREDICT CONFIRMATION DELAY DURATION (IN DAYS) USING SINGLE RECORD EVENTS ****






** H1 & H2: CONDITIONAL POLITICAL FRAGMENTATION EFFECTS [INTER-BRANCH & INTRA-BRANCH COORDINATION] CONDITIONED BY NOMINEE POSITION TYPE ***



** BASIS FOR H1: SOP/EXTERNAL FRAGMENTATION BETWEEN PRESIDENT AND SENATE SHOULD EXACERBATE DELAY MORE FOR "TIER 2" NOMINEES COMPARED TO "TIER 1" NOMINEES **

** BASIS FOR H2: INTERNAL LEGISLATIVE FRAGMENTATION WITHIN THE SENATE MAKE COORDINATION COSTS HIGHER FOR "TIER 2" NOMINEES COMPARED TO "TIER 1" NOMINEES **



***  H3 & H4:  CONDITIONAL ADMINISTRATIVE RESPONSIVENESS EFFECTS [AGENCY INSULATION AND PRESIDENTIAL LOYALTY] CONDITIONED BY NOMINEE POSITION TYPE ***


*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************




*** PART 1: MODELS ANALAYZING OVERALL/TOTAL CONFIRMATION DELAY [CONFIRMATION DATE - NOMINATION DATE] *** 


                                                                                                                                                                                                                                                               

*** MODEL 1: PREDICTING TIME FROM NOMINATION TO TIME TO CONFIRMATION ON SENATE FLOOR [confdur] - NON-AUGMENTED MODEL (DOES NOT ACCOUNT FOR SAMPLE SELECTION BIAS) ****


 
*** ASYMMETRIC LAPLACE MLE CONDITIONAL QUANTILE SURVIVAL REGRESSION PERCENTILES ["DUE DILIGENCE" MODEL] ***

laplacereg confdur  filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing  excalendarcong ///
pressenmajopposeagency pressenmajalignagency agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43 if confirmselectin==1, failure(confirmobserved) quantiles (1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99) ///
seed(123) reps(1000)
*


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

*** POST-ESTIMATION LINCOMS ONLY FOR CONTEXTUAL POSITION TYPE SLOPE PARAMETER DIFFERENCES FOR "DUE DILIGENCE" COVARIATES ///
*** TO EVALUATE MAX-MIN RANGE IMPACT OF COVARIATE ON CONFIRMATION DELAY OUTCOME VARIABLE ***
  

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
set matsize 800           
 
*** ESTIMATE CONDITIONAL MIN - MAX [0.401 - 0.000 = 0.401] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q05]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q10]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q15]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q20]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q25]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q30]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q35]filipresdistlewiszbtoplev2   * 0.401 
*
lincom [q40]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q45]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q50]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q55]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q60]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q65]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q70]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q75]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q80]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q85]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q90]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q95]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q99]filipresdistlewiszbtoplev2   * 0.401
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use1.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']filipresdistlewiszbtoplev2 * 0.401
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use1.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("|President-Senate Filibuster Pivot|", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)100, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG1A.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG1A.eps"

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 


*** ESTIMATE CONDITIONAL MIN - MAX [0.118 - 0.000 = 0.118] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q05]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q10]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q15]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q20]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q25]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q30]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q35]senpartydiffmedlewiszbtoplev2 * 0.118 
*
lincom [q40]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q45]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q50]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q55]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q60]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q65]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q70]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q75]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q80]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q85]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q90]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q95]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q99]senpartydiffmedlewiszbtoplev2 * 0.118
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use2.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']senpartydiffmedlewiszbtoplev2 * 0.118
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use2.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Senate Party Polarization", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-250(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
* 
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG1B.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG1B.eps"


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [2.673 - 0 = 2.673] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]agencyindzbtoplev2 * 2.673
*
lincom [q05]agencyindzbtoplev2 * 2.673
*
lincom [q10]agencyindzbtoplev2 * 2.673
*
lincom [q15]agencyindzbtoplev2 * 2.673
*
lincom [q20]agencyindzbtoplev2 * 2.673
*
lincom [q25]agencyindzbtoplev2 * 2.673
*
lincom [q30]agencyindzbtoplev2 * 2.673
*
lincom [q35]agencyindzbtoplev2 * 2.673 
*
lincom [q40]agencyindzbtoplev2 * 2.673
*
lincom [q45]agencyindzbtoplev2 * 2.673
*
lincom [q50]agencyindzbtoplev2 * 2.673
*
lincom [q55]agencyindzbtoplev2 * 2.673
*
lincom [q60]agencyindzbtoplev2 * 2.673
*
lincom [q65]agencyindzbtoplev2 * 2.673
*
lincom [q70]agencyindzbtoplev2 * 2.673
*
lincom [q75]agencyindzbtoplev2 * 2.673
*
lincom [q80]agencyindzbtoplev2 * 2.673
*
lincom [q85]agencyindzbtoplev2 * 2.673
*
lincom [q90]agencyindzbtoplev2 * 2.673
*
lincom [q95]agencyindzbtoplev2 * 2.673
*
lincom [q99]agencyindzbtoplev2 * 2.673
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use3.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']agencyindzbtoplev2 * 2.673
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use3.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Decision Maker Independence", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-450(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG1C.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG1C.eps"


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [4.6155 - 0.039 = 4.5765] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q05]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q10]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q15]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q20]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q25]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q30]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q35]zloyalmedianzbtoplev2  * 4.5765 
*
lincom [q40]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q45]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q50]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q55]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q60]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q65]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q70]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q75]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q80]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q85]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q90]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q95]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q99]zloyalmedianzbtoplev2  * 4.5765
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use4.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']zloyalmedianzbtoplev2 * 4.5765
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use4.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Presidential Nominee Loyalty", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-200(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
* 
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG1D.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG1D.eps"

*
* 
*
*graph G.1
cd "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G"

gr combine FigureG1A.gph  FigureG1B.gph, b1title("Quantiles") iscale(1) 

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG1Acomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG1Acomb.eps"

*graph G.2
gr combine FigureG1C.gph FigureG1D.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG1Bcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG1Bcomb.eps"



************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

 



*** PART 2: MODELS ANALYZING SENATE COMMITTEE CONFIRMATION DELAY: INFORMATIONAL VETTING [REPORTED OUT OF SENATE COMMITTEE DATE - NOMINATION DATE] *** 



use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace



*** CREATE NEW COVARIATES THAT ACCOUNT FOR DISTINCTIONS BETWEEN BOTH PRESIDENT & SENATE MAJORITY OPPOSED AS WELL AS ALIGNED WITH AGENCY IN QUESTION *** 
*** REPLACE SENMAJAGENCYIDEOLOPPOSE & SENMAJAGENCYIDEOLALIGN COVARIATES EMPLOYED IN BOTH THE MANUSCRIPT MODELS AND ELSEWHERE ***



*** BOTH PRESIDENT & SENATE MAJORITY ARE IDEOLOGICALLY ALIGNED WITH AN AGENCY ****

gen pressenmajalignagency =  1 if prespty2==-1 & senmajparty==-1 & agencyideol==-1
replace pressenmajalignagency =  1 if prespty2==1 & senmajparty==1 & agencyideol==1
replace pressenmajalignagency =  0 if pressenmajalignagency==. & agencyideol!=.
*
tab pressenmajalignagency


*** BOTH PRESIDENT-SENATE MAJORITY ARE IDEOLOGICALLY OPPOSED TO AN AGENCY ****

gen pressenmajopposeagency =  1 if prespty2==-1 & senmajparty==-1 & agencyideol==1
replace pressenmajopposeagency =  1 if prespty2==1 & senmajparty==1 & agencyideol==-1
replace pressenmajopposeagency =  0 if pressenmajopposeagency==. & agencyideol!=.
*
tab pressenmajopposeagency



************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************ 
                                                                                                                                                                                                                                                                   

*** MODEL 2: PREDICTING TIME FROM NOMINATION TO TIME TO REPORTED OUT OF SENATE COMMITTEE [LEGVETDUR] - NON-AUGMENTED MODEL (DOES NOT ACCOUNT FOR SAMPLE SELECTION BIAS) ****

  
     
*** ASYMMETRIC LAPLACE MLE CONDITIONAL QUANTILE SURVIVAL REGRESSION PERCENTILES ["DUE DILIGENCE" MODEL] ***


laplacereg legvetdur  filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
pressenmajopposeagency pressenmajalignagency agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated  ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43 if confirmselectin==1, failure(confirmobserved) quantiles (1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99) ///
seed(123) reps(1000)


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************


*** POST-ESTIMATION LINCOMS ONLY FOR CONTEXTUAL POSITION TYPE SLOPE PARAMETER DIFFERENCES FOR "DUE DILIGENCE" COVARIATES ///
*** TO EVALUATE MAX-MIN RANGE IMPACT OF COVARIATE ON CONFIRMATION DELAY OUTCOME VARIABLE ***
  

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

 
set matsize 800           
 
*** ESTIMATE CONDITIONAL MIN - MAX [0.401 - 0.000 = 0.401] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q05]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q10]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q15]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q20]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q25]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q30]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q35]filipresdistlewiszbtoplev2   * 0.401 
*
lincom [q40]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q45]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q50]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q55]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q60]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q65]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q70]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q75]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q80]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q85]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q90]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q95]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q99]filipresdistlewiszbtoplev2   * 0.401
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use5.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']filipresdistlewiszbtoplev2 * 0.401
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use5.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("|President-Senate Filibuster Pivot|", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)100, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG2A.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG2A.eps"


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 


*** ESTIMATE CONDITIONAL MIN - MAX [0.118 - 0.000 = 0.118] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q05]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q10]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q15]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q20]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q25]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q30]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q35]senpartydiffmedlewiszbtoplev2 * 0.118 
*
lincom [q40]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q45]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q50]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q55]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q60]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q65]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q70]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q75]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q80]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q85]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q90]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q95]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q99]senpartydiffmedlewiszbtoplev2 * 0.118
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use6.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']senpartydiffmedlewiszbtoplev2 * 0.118
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use6.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Senate Party Polarization", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-250(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG2B.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG2B.eps"

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [2.673 - 0 = 2.673] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]agencyindzbtoplev2 * 2.673
*
lincom [q05]agencyindzbtoplev2 * 2.673
*
lincom [q10]agencyindzbtoplev2 * 2.673
*
lincom [q15]agencyindzbtoplev2 * 2.673
*
lincom [q20]agencyindzbtoplev2 * 2.673
*
lincom [q25]agencyindzbtoplev2 * 2.673
*
lincom [q30]agencyindzbtoplev2 * 2.673
*
lincom [q35]agencyindzbtoplev2 * 2.673 
*
lincom [q40]agencyindzbtoplev2 * 2.673
*
lincom [q45]agencyindzbtoplev2 * 2.673
*
lincom [q50]agencyindzbtoplev2 * 2.673
*
lincom [q55]agencyindzbtoplev2 * 2.673
*
lincom [q60]agencyindzbtoplev2 * 2.673
*
lincom [q65]agencyindzbtoplev2 * 2.673
*
lincom [q70]agencyindzbtoplev2 * 2.673
*
lincom [q75]agencyindzbtoplev2 * 2.673
*
lincom [q80]agencyindzbtoplev2 * 2.673
*
lincom [q85]agencyindzbtoplev2 * 2.673
*
lincom [q90]agencyindzbtoplev2 * 2.673
*
lincom [q95]agencyindzbtoplev2 * 2.673
*
lincom [q99]agencyindzbtoplev2 * 2.673
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use7.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']agencyindzbtoplev2 * 2.673
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use7.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Decision Maker Independence", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-450(50)100, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG2C.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG2C.eps"

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [4.6155 - 0.039 = 4.5765] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q05]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q10]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q15]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q20]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q25]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q30]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q35]zloyalmedianzbtoplev2  * 4.5765 
*
lincom [q40]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q45]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q50]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q55]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q60]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q65]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q70]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q75]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q80]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q85]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q90]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q95]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q99]zloyalmedianzbtoplev2  * 4.5765
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use8.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']zloyalmedianzbtoplev2 * 4.5765
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use8.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Presidential Nominee Loyalty", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-200(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG2D.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG2D.eps"
*
*
*
*graph G.3
cd "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G"

gr combine FigureG2A.gph  FigureG2B.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG2Acomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG2Acomb.eps"
*
*graph G.4
gr combine FigureG2C.gph FigureG2D.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG2Bcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG2Bcomb.eps"

************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 


 
 

*** PART 3: MODELS ANALYZING PROCEDURAL VETTING ON SENATE FLOOR STAGE [CONFIRMATION DATE - REPORTED OUT OF SENATE COMMITTEE DATE] *** 


use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace




*** CREATE NEW COVARIATES THAT ACCOUNT FOR DISTINCTIONS BETWEEN BOTH PRESIDENT & SENATE MAJORITY OPPOSED AS WELL AS ALIGNED WITH AGENCY IN QUESTION *** 
*** REPLACE SENMAJAGENCYIDEOLOPPOSE & SENMAJAGENCYIDEOLALIGN COVARIATES EMPLOYED IN BOTH THE MANUSCRIPT MODELS AND ELSEWHERE ***



*** BOTH PRESIDENT & SENATE MAJORITY ARE IDEOLOGICALLY ALIGNED WITH AN AGENCY ****

gen pressenmajalignagency =  1 if prespty2==-1 & senmajparty==-1 & agencyideol==-1
replace pressenmajalignagency =  1 if prespty2==1 & senmajparty==1 & agencyideol==1
replace pressenmajalignagency =  0 if pressenmajalignagency==. & agencyideol!=.
*
tab pressenmajalignagency


*** BOTH PRESIDENT-SENATE MAJORITY ARE IDEOLOGICALLY OPPOSED TO AN AGENCY ****

gen pressenmajopposeagency =  1 if prespty2==-1 & senmajparty==-1 & agencyideol==1
replace pressenmajopposeagency =  1 if prespty2==1 & senmajparty==1 & agencyideol==-1
replace pressenmajopposeagency =  0 if pressenmajopposeagency==. & agencyideol!=.
*
tab pressenmajopposeagency



*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

                                                                                                                                                                                                                                                                   

*** MODEL 3: PREDICTING TIME FROM REPORTED OUT OF SENATE COMMITTEE TO CONFIRMATION ON SENATE FLOOR [POLVETDUR] - NON-AUGMENTED MODEL (DOES NOT ACCOUNT FOR SAMPLE SELECTION BIAS) ****


 
*** ASYMMETRIC LAPLACE MLE CONDITIONAL QUANTILE SURVIVAL REGRESSION PERCENTILES ["DUE DILIGENCE" MODEL] ***


laplacereg polvetdur  filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
pressenmajopposeagency pressenmajalignagency agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43 if confirmselectin==1, failure(confirmobserved) quantiles (1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99) ///
seed(123) reps(1000)


*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

*** POST-ESTIMATION LINCOMS ONLY FOR CONTEXTUAL POSITION TYPE SLOPE PARAMETER DIFFERENCES FOR "DUE DILIGENCE" COVARIATES ///
*** TO EVALUATE MAX-MIN RANGE IMPACT OF COVARIATE ON CONFIRMATION DELAY OUTCOME VARIABLE ***
  

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

 
set matsize 800           
 
*** ESTIMATE CONDITIONAL MIN - MAX [0.401 - 0.000 = 0.401] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q05]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q10]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q15]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q20]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q25]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q30]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q35]filipresdistlewiszbtoplev2   * 0.401 
*
lincom [q40]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q45]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q50]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q55]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q60]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q65]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q70]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q75]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q80]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q85]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q90]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q95]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q99]filipresdistlewiszbtoplev2   * 0.401
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use9.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']filipresdistlewiszbtoplev2 * 0.401
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use9.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("|President-Senate Filibuster Pivot|", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
* 
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG3A.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG3A.eps"



*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** 
 

*** ESTIMATE CONDITIONAL MIN - MAX [0.118 - 0.000 = 0.118] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q05]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q10]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q15]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q20]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q25]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q30]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q35]senpartydiffmedlewiszbtoplev2 * 0.118 
*
lincom [q40]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q45]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q50]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q55]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q60]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q65]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q70]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q75]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q80]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q85]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q90]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q95]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q99]senpartydiffmedlewiszbtoplev2 * 0.118
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use10.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']senpartydiffmedlewiszbtoplev2 * 0.118
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use10.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Senate Party Polarization", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-100(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG3B.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG3B.eps"



***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [2.673 - 0 = 2.673] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]agencyindzbtoplev2 * 2.673
*
lincom [q05]agencyindzbtoplev2 * 2.673
*
lincom [q10]agencyindzbtoplev2 * 2.673
*
lincom [q15]agencyindzbtoplev2 * 2.673
*
lincom [q20]agencyindzbtoplev2 * 2.673
*
lincom [q25]agencyindzbtoplev2 * 2.673
*
lincom [q30]agencyindzbtoplev2 * 2.673
*
lincom [q35]agencyindzbtoplev2 * 2.673 
*
lincom [q40]agencyindzbtoplev2 * 2.673
*
lincom [q45]agencyindzbtoplev2 * 2.673
*
lincom [q50]agencyindzbtoplev2 * 2.673
*
lincom [q55]agencyindzbtoplev2 * 2.673
*
lincom [q60]agencyindzbtoplev2 * 2.673
*
lincom [q65]agencyindzbtoplev2 * 2.673
*
lincom [q70]agencyindzbtoplev2 * 2.673
*
lincom [q75]agencyindzbtoplev2 * 2.673
*
lincom [q80]agencyindzbtoplev2 * 2.673
*
lincom [q85]agencyindzbtoplev2 * 2.673
*
lincom [q90]agencyindzbtoplev2 * 2.673
*
lincom [q95]agencyindzbtoplev2 * 2.673
*
lincom [q99]agencyindzbtoplev2 * 2.673
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use11.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']agencyindzbtoplev2 * 2.673
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use11.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Decision Maker Independence", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)100, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG3C.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG3C.eps"


**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [4.6155 - 0.039 = 4.5765] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q05]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q10]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q15]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q20]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q25]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q30]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q35]zloyalmedianzbtoplev2  * 4.5765 
*
lincom [q40]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q45]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q50]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q55]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q60]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q65]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q70]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q75]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q80]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q85]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q90]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q95]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q99]zloyalmedianzbtoplev2  * 4.5765
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use12.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']zloyalmedianzbtoplev2 * 4.5765
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/use12.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Presidential Nominee Loyalty", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG3D.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG3D.eps"

* 
*
*graph G.5
cd "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G"

gr combine FigureG3A.gph  FigureG3B.gph, b1title("Quantiles") iscale(1) 

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG3Acomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG3Acomb.eps"
*
*graph G.6
gr combine FigureG3C.gph FigureG3D.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix G/FigureG3Bcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix G/FigureG3Bcomb.eps"

************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

log close





